more packet handling functions filled in