Code for RUBY