removed functions that use db