replace with CommandType

Replace the remaining CommandType