something didn't quite work, adding some debug statements