backbone of chapter on useful functions