moved Seismic Unix reader to subroutine