Implemented IP stuff properly