added some convenient psd solving stuff