added func to get user input