finished up uinput function.