Makes filter function work with data.