Implemented incoming packet handler