Properly annotate function