moved first instantiation of DB object outside if statement so that the
database helper gets created when app is first started