refactor limit method