make code more platform independant