Updated with function including all comments