minor modification for platform detection