add condition and validation
Merge pull request #39 from bhimasta/bhimasta

add condition and validation