aravind, mahendra | #149 | refactored code