functions upgrade