working for one-param functions