used mock to patch user input