adds update functionality