fixing defects #8, #9, #10: cuong edit