new step to copy data from prm to tmp; few changes