run function for sequence