implemented some data structures