Subject: replaced if else functionality with switch case

Description: