wavelets modified to fit my MPI stuff