queries are slow, need to make indices in createDB and intermediate tables in queries to speed things up