refactored jdbc classes