adding application logic; stopped on pg 94