Use element as a parameter for update the function