changes to fragment and db handler