need to fix the input bug