corrected comments and checked outputs