See reference below for details.