added more comments and deleted some not neccessary lines.