added more db calls