re designed algorithm, working on getting up and running