makes me think my patch is probably wrong here, regarding the `w` var.