any reason for removing the try/catch around the flatten fn?