added more comments, now makes output path