add global selection model
move scripts to end of body