added main code

I have added the main code of this repo