implement read header method