Add some functions

to be continued.