adding platform detector
change function staticaly