Change code with corresponding new signature of GetTarget func