refactor to remove cruft from constructor