Adapt for code for 2014 assignment