modify method of init empty array