added platform check