adds tests and implements basic planner