utilized init function in all shape constructors