first commit on this branch@
adding open/close DB on every query