Step-5: passed the previous test. Still need to refactor