is there a way to make this code smaller (it repeats some things a few times)

Printable View