change the data structures.

Suggested by mpi@