code with correct  output but with improper alignment