using ternary operator
added validation
addd readme