handling user input with 2 ways binding