fixed typo bug in anthony's code