3rd commit, Refactored previous code