New Function added
Formatting changes, addition of new function and minor fix