ui method can use a switch statement
Fixed spacing to better fit my preferred standards.