WIP: notes for conversion to functions