move the order of call in the "seq" function