switch case

Use switch case and contains methods