fleshed out rectangle behavior