encapsulate all functions in a single global object