added some functions

requires cpp file which i dont know how to upload