moved </body> to outside <script>