add packet writer test