still fixing sql