Added documentation and comment