added share variables beetween threads