Finally, the program is actually performing some kind of HF-algo! (Results off though)