Made use of 'synchronized'.