add #at_least, #at_most, #times
Use global variable instead of instance