still plenty of commented and test and placeholder code, but making queries works