Updated based on the requested code changes.