added moving code