move scripts to the end of body