further separate platform-specific code