included psi-test in functions