fixing layouts in class definition