removed platform-specific code