Change main update method to switch statement