need to remove the db calls from main thread