added example of correct usage of volatile keyword