refactor of pasic functionality