added pre-commit hook functions