Added main loop

Added loop to keep querying the user.