moved save to DB to an asynchronous task