change some structure of trim funciton in pso, de to adapt osyczka