packet implementation