changed zeros and ones to use ConstArray