use 'filter' instead of 'if'