wrote preliminary code for Judah