Updating to process all input together