replaced custom sizeof with ARRAY_SIZE