refactor jdbc