implement comman algorithms and data structures