made the helper functions private (only define and undefine are public)