cleaned up xml, added getip method