added synchronized subscriptions and connection to DB