added debug prints