Some design patterns implementation