Started working in the output logic