small refactoring to soon handle any DB