saving param variables in structure p, made option for different trigger types, cleaned up display trigger function. generally things are working