added closure definition