shouldn't this be `$key` ?