update python and java examples