Can this code be simplified? is this correct

Printable View