copied down from book. will continue work.