Ad a few useful functions and change reduce trigger