implemented resources + DBConnector refactoring