Added better filtering