initial cross platform changes; probably breaks windows