using the original middlewares again. partially
added db middleware again
demo api