major revision--pretty close to google doc version