split out functions (into func/) from defines (staying in inc/); update example 2 to reflect changes