Added capacity to accept stdin as input