update the constructor of Shape class