Using the monitor input to trigger a function