added debug printout