made some progress on debugging