[#532] also modified the `setShape` function to follow the new constructor