tried to make functions to perform comparisons for me, coded it up for sparsity test -- working on testing