Replaced Switch with If/Else