modified tests and implemented calculateAbsolutePositionOfCursor