tiny bugfix for repeat function
ordering procedure