refactor out unnecessary object