Why does this function receive key as a parameter if then is never used?