updated the javascript to bind on ready