added code for 514 problem
Merge pull request #2 from rahulroot/514-code

added code for 514 problem