learning design pattern