changed some types from unsigned to unsigned long to allow reading of multi-gig datafiles