small refactor, moved object out of method so it only get's defined once