comment, clean and refactor of code