MagicPacketService.java
refactoring