added DB connection logic + some examples