added function updateMaster