beginning of constructor for link and array