updated to use sanitized handles instead