genericize custom input