removing unneeded code/simplifying filtering
simplifying with nonzeros function
removing old filtering code/simplifying filters