Improving homework1