refactoring and be able to created host before inserting port while scanning a network