Basic function is done
Correct the input bug