#16 - added chain as the connection state listener parameter