making 'adjust_lim' global function