moved layouts to top of class