remove duplicate calls to db