write pins in reverse chronological order