in reply to Pattern mattching

Thanks Everyone for the solution.