Adding thencall logic

Change-Id: I98131ce6d55893079cc3ca38ab51bd893c92da59