found problem - shared variable should have been private