updated to chapters Functions (unfinished)