updated examples for using frames APIs.