What is ip ? There is no previous definition in this function.