Adding internal isvalidevent method
smal refactoring
adding packet method