stable version for rect