docs updated, used right global var