added closure to path()