made a struct called chain