add reposition function