Application of a generalisation of Wald's identity to solving certain multi-stream storage problems