Added new function and documentation