add support for function and input