add type to function and signal