add a selected variable for the focus state of inputs