Deleted some code from filterEvent method