refactor restriction method