workaround solution for out of sync issues of concurent clients
TODO - the getBranchHash and SetBranchHash should be refactored