begining of algorithm library