needed to add [0] to min identifying chi