multi platform support (cpp still not working)