software design using pattern