infer l and w