ip3 constructor refactored