Added a lot of functions