Improving compinvesting hw3