wavefunctions working fine