refactor completed; the requirements for knockout stage are working