adjust db and end point