implementation of basic data structure.