rewrote steps function for both levels based on heuristics