Improved target algorithm