sparsity calculation added and l21norm bug fixed