code changes for is exists...