Working Algorithm, basic GUI