refactoring and singleton design pattern for dao & service