Small additions to code for previous iteration of code