simplifying code by changing Rectangle class to Target class
programming in correct ratios