remove lots of db write