Added code from previous assignment