from and into as function