algorithms library improved