changed convertToSequence class