change tabs to spaces, added reverse list swap