Ballooning mode calculations in stellarators