added application controller logic