moved script to before closing head tag