added psi parsing