debugging, just sql remaining