this warning should appear at the top of this function, not at the end.