code comments and feedback added