refactor out ugly argument