Use switch...case instead of cascading if..else