rewrote some of 4.1