added platform guessing func