added if
added main function
Merge pull request #1 from PLT-MAP/Forloop

Forloop