Changed way to gather ip