move unit tests into limit.m