converted design patterns project to a library