Added emit signal function