Added merge tasks functionality