completed add-a-controller assignment
small refactor, moved object out of method so it only get's defined once