incorrectly used seq_along instead of seq_len