Added slicesdir function.