Added the synchronized modifier as synchronised