completed number 5, need to refactor