updating the first problem(just added more comment)