- astar implemented
- abstracted some code