db abstruction layer implemented