more development - need work on public settings var in functions library