added debug printf