added slice export; fixed slice change bug