Change variable, remove console.log and add validation