refactor this code for simply target.