set position in setPosition method