using Function interface