optimised the splits reading/writing for function input
and sequence input by only writing/reading the relevant
offset/length