started adding generation trigger functionality