modify the PackageReader and SocketListener class