rectangle class solutions