Add SF analysis code