Added foreach to link class