Modified API to provide write and read sequence