removed the use of db