reworking boilerplate to new architecture