Added function and clarified code