adding comments and removing console.log lines