refactored the sequence file api