store position and position history