settled for final version of psi implementation