made some chnages from D. Still need more.