using class to assign input