add init function

used to set up shape constructors