started assignment1 task 5, rewriting match methods 1.5