fix closure and do syntax