author version; removed garbage