changed ksparse to arbitrary axes, adjustments of rest