refactor input restrictions class