another rect function