refactored packages
added a framework for testing packet validity