api_get_lw() should be in main()