refactoring applied to interface.rb