improved filtering and sorting closes #25