fixed database calls

everything works