changed parameter order for ip and remoteAddress