refactoring & add DBhelpers