added code for discarding extra lo0t in phase IV - check