Added some functions, added demo