fixed javascript to load on document ready