minor bugs solved
file that has api functions, database queries