deleted checkIfOne function and some console logs