moved slice to filter, should be faster