refactor just a touch