working towards atomic update