use seq instead of using .length