practice design pattern