general algorithm library