refactory registry listener