improve example python