re-org according to Stein's suggestions