Created packet manipulations functions