added trigger methods and specs; wrapped in anonymous function