Added prolog assignment.  Almost works correctly.