implimented possibility to choose algorithm