updated type export and std::size_t header
implmeneted buffer switch