removed non-portable code