added named function and input form