rewrote object construction