change to latest spec
fix some remaining issues