move scripts to end of body