some progress on type spec
spec complete