Added a function for target selection and highlight