Updated with refactoring
Updated with refactoring