refactor, use Array.every