refactoring axis.rb