Bringing external functions inside the class
Removed additional function
Refactor