editied to remove uses of platform, switching to import