added code to block unnecessary packets