implement data structure