ints changed to double, code works, need to deallocate
larger txt file