move script from head to body