refactored commit

refactored code