debugging messages added ...to be removed once issues are fixed