removed unnecessary switch construct