update function for JoinedWays