Added some comments and a new function
Merged Conflicts