add function range written in toy… which is extremely slow