Update instance_methods.rb

perfomance optimization