Fixed psi, added print1d and print2d functions