adding some memory mapped IO features
clean up.