added mainContainer.finish()