redesign of start up code. part2
merge.