refresh data after writing to db