implemented rectangle draw