finished mostly the input class