removed inner closures as redundent