updated the Function interface