input: little improvement to the input module