Added support for remote database