updated code to use the latest ruby