refactor and unit test
README updated and config min interval enforced