Working on db in main activity