making drawing rect vectorized