changed db by using api service