-added debug printout