first pass of debugging

more to come!