replaced third diagram