fixes #177; removed bad reference and simplified calculation