First set calculation almost working well