adjusted AStar to given map and map element class