switch len out for cap