Added functionality to Rectangle class