Delete switch statement due to attribute cannot use that.