added comments and report feature plus refactored