I think smaller_than and larger_than can be one function here. Also, look into using iterators like `filter`. `collect` will be helpful too. (I can help more with this if you're stuck.)