preparing data for psom