added functionality to create event button that sends pinn data to server