refactor for inputTarget