added just-in-time initialization support to use_app method