add type and function specification