new code from book