code seems OK; still wavelets test to write