Added clone function to rectangle