add type definitions to different functions