added ajax and javascript to public