add head method feature
finetine readbuffer size
correct type switch usage
reduce object creation