performance improvements, working on target coordinates