Added contrast function