moved the limit function into the omnilib.c