algorithm logic in README