rearrange the scripts to limit initialization