Added doc string and comments