Refactor code to utilize the Array.new method. Forgot about the condition