add limit method and unit tests