Added custom event and remaining functionality