global functions and data types