Reimplmenting PSRS function