changes for version 2 of assignment 4 incorporated