practise of design patterns