add platform checking