added moveTo function