Corrected implementation of story 6