added debug function
update
update