Input managing logic