filter() output is cast to list for python 3 compatibility