Change to array-based method for coverage and update tests