Replaced if() else() logic with switch() logic