added optional movement function. implementation complete but unused
added some comments