Corrected output based on new requirement