perepare function move