Moved fewest hop into user input function