adaptative rectangle