crap
implementation to pre-commit hook