added pre-commit
standardised event passing