adding packet class and constructor