Add stream function definitions