made some methods syncronized