changed the default behavior for rect | nil => now returns rect