refactor input classes