refactored to be consistent with use of instance variables and params in views