extracted flush to function
pre-commit hook, to run tests