Assignment 5 in place