rewrite to support in app billing 3