chaining db calls implemented