comparing classes with is_a? instead of ==