added ruby conditionals