all sql written, now debugging