fixed to use tags to get ip addresses