added movepoint function