cleanup arrays
kg toolkit