Made the code more portable!