add some functions and a data structure