finished up debug & comments