Fixed bug from misinterpretation of brief for step 5 of algorithm