move helpers from platform-api