Implemented expand and contract