new version of previous modification without the BC Break (separate <script> tag and js code)