make input stuff more general