Added function and example usage