refactor code, add comments, update report