updated example to 0.5 API