added  functional interface
func way
functional api