update first three functions