move script to end of body