types and functions