Created lib to run function in series