What's going on in the code here? This seems to just be completely breaking the functionality of this method.