updated printmethod.rb script