fixed gtrows etc and passing tests