fixes syntax error, adds database entries