Homework-4 version 2