finished iterative clf script