add custom type
Custom type and functions