added debug outputs