Added Function
Refactoring Code