finished impelementing sparsityScore