Modified to accept user input