Partial completion of hw3