fixed python and java api examples