Passing level 5 intermediate
Refactor method to avoid stepping on stairs prematurely