Add another implementation of f; bit cleverer