handling slave/ip better