adding rectangle function