Updated with complete comments