doing Homework1 the right way