Changed input process. More flexible.