incorrect var-names fixed