move db interactions to async task and add db exists test