Added documentation
Fixed error with var name