add Rectangle and improve transformations