len refers to struct A but should refer to an enum