adding ruby functions