Added sys for r2
done merge
Added re lib. complelted coding