added documentation for 'filter' function