Added as many functions as I could