added packet system, can be easily ported to 1.7