many additions and refinements