working through jdbc logic