Fixed switch statement and updated methods