convert index sample code to tabs