working on updating the db realtime