Instead of a signal use a function.