rectangles problem
candy3 solution added
made changes, added comments