fixed errors, changed to sqlite for testing