switch case statements and other updates