do code more portable, correct prototypes