added indentation and comments