add read type to read.cpp and type.cpp type.h