wrong variable names, now fixed