replaced copy-paste subview definitions with for loop