minor re-arrangement