Wrapped in main for windows