fixed bug with lists, still get diff. results from old code, don't know which is right