Update method edited

update edited for performing in one run for all elements