implemented datastructure 2