Updated to use Stream API