add rebuildAppInstance method