very rough attempt at new layout to avoid issues with instance variables