an implementation of some basic data structures