Add function to create triggers