removed malloc/calloc, using fixed-length arrays.