first commit of refactored code