added closure patterns.