refactoring for WPS and Rails 4