refactor of abstract design pattern done