modified controller to match views