reworked packet validation