added closure support