Implemented packet handling