logic/functions library