update sql written. all tests passing