make code more portable