Updated cases to opacity function for new max value