handling m = infinity