re #959: removed all debugs and added comments