Update example, adjust functions