some data structure and algorithms