improved live api example