add pre-commit hook for automated testing