All fetures are working properly before for both states first inserted total is not adding and some bugs solved