adding better support for persistence connection