work type by function

castle