fixed generic method for lm.W