Logic changes

Some changes in tast 2, 3 and 6