added gc() to form k counts