works with user input