updated to include new code changes and warning