added exception in connection