Comments and output to file were added