further work on rect class