added platform checking