revamped the project do it lack of seperation between main and createPacket