Assignment 5 and some minor modifications to 4.