rewrote the initialization