still working on the sql