updated for new platform api