move packet folder and add some functions