Removed unnecessary switch statement