updated to the new API
updated the java app to the new api