changed Method name and code refactor