debug and clean up
update