added trigger mechanism