roughed out a better architecture