Removed repitive lines from case match expression