working now, running from sqlite, still a bit slow