implementation of data structures