added constructor which accepts IPAdress type