added logic for enable application