Added Comment and tidied code