changed inerhitance from rect