WT-15 - checked sync method and did some refactoring